﻿using System.Collections.Generic;
using System.Xml.Serialization;
using TeaLight.Core.DAL;

namespace TeaLight.Core.BL.Entities
{
    public partial class Speaker
    {

        #region Associations

        [XmlIgnore]
        [TeaLight.DL.SQLite.Ignore]
        public IEnumerable<Session> Sessions
        {
            get
            {
                return SpeakerRepository.GetSessions(this);
            }
        }

        #endregion


        public string Index
        {
            get
            {
                return Name.Length == 0 ? "A" : Name[0].ToString().ToUpper();
            }
        }
    }
}
